import { defineStore} from 'pinia'

export const mainStore = defineStore('mainStore',{
  state:()=>{
    let isCollapse =  true
    let currentMenu = null
    let tabList = [
      {
        path: '/',
        name: 'home',
        label: '首页',
        icon: 'home'
      }
    ]
    return {
        isCollapse,
        currentMenu,
        tabList
    }
  },
  getters:{},
  actions:{
    selectMenu(val:any){
      // 判断
      val.name == 'home' ? (this.currentMenu = null) : (this.currentMenu = val)
    }
  }
})